<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 比较运算符
        console.log(3 == '3');
        console.log(3 == '3a');
        console.log(3 == '3.0');
        console.log(3 == 3.0);
        console.log(3 >= 4);
        console.log(3 > 4);
        console.log(3 === '3');
        
        // 特殊值比较
        console.log(Infinity == Infinity);
        console.log(+Infinity == -Infinity);
        console.log(+0 == -0);
        console.log(null == 0);
        console.log(NaN == NaN);
        // 会转换成false
        console.log(null == undefined);
        // 数据类型不同
        console.log(null === undefined);

        // 特殊情况
        console.log("============特殊情况==============")
        console.log(1 == true);
        console.log(0 == false);
        console.log(0 == null);
        console.log('abc' > "Abc")
        console.log('abcd' > "bcde")
        
        // undefined会转成NaN
        console.log(NaN==undefined)
        console.log(NaN==NaN)
        console.log(NaN===undefined)

    </script>
</body>
</html>